home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-05-21 | 910 b | 45 lines |
- /* $Id: TitlePanel.java,v 1.2 1996/03/28 08:48:06 djun Exp $
-
- File: TitlePanel.java
-
- Author: Djun M. Kim
- Copyright (c) 1996 Djun M. Kim. All rights reserved.
-
- */
-
- import java.awt.*;
- import AboutPopup;
-
- public class TitlePanel extends Panel {
-
- private MapInfo parent;
-
- private AboutPopup infoframe;
- private Button title_button;
- private String title_string;
-
- TitlePanel(MapInfo target) {
- this.parent = target; // get our parent
- setLayout(new GridLayout(1,1));
- title_string = parent.map.getTitle();
- title_button = new Button("MapInfo - "+title_string);
- add(title_button);
- infoframe = new AboutPopup(target);
- }
-
- public boolean action(Event evt, Object arg) {
-
- if (evt.target instanceof Button) {
- Button b = (Button)evt.target;
- if (b == title_button) {
- if (!infoframe.isShowing())
- infoframe.show();
- }
- }
- return true;
- }
-
- }
-
-
-